/*
  Author: Daniel Pflieger
  Assignment 4: Writing Random Testers - Adventurer Card

  Aim: The goal of this assignment is to write a random test function
  for the Adventurer card.  The ADventurer card is an action card that
  allows the player to draw cards until they receive two money cards.
  These cards can be bronze, silver, or gold.  The money cards that are
  found can be used in the following purchase. The following states
  are expected to happen during play of the ADventurer card.

  The deckcard should be one less than the last state
    if the deck is empty, the deck needs to be shuffled.
    
  The player should pick a card.
  If the card is a coin card, it should be added to the players hand
  The value of the coin card should increase, the number of cards in played cards should only increase by one

  If the card is not a coin card, the player should pick again




  // REfoactored code from dominion.c for reference

  
    
  if (card == adventurer){
  while(drawntreasure<2){
  if (state->deckCount[currentPlayer] <1){//if the deck is empty we need to shuffle discard and add to deck
    shuffle(currentPlayer, state);
    }
    drawCard(currentPlayer, state);
    cardDrawn = state->hand[currentPlayer][state->handCount[currentPlayer]-1];//top card of hand is most recently drawn card.
    if (cardDrawn == copper || cardDrawn == silver || cardDrawn == gold)
      drawntreasure++;
      else{
        temphand[z]=cardDrawn;
	  state->handCount[currentPlayer]--; //this should just remove the top card (the most recently drawn one).
	    z++;
	    }
      }
      while(z-1>=0){
      state->discard[currentPlayer][state->discardCount[currentPlayer]++]=temphand[z-1]; // discard all cards in play that have been drawn
      z=z-1;
      }
      return 0;






*/


#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#include <assert.h>
#include <string.h>
#include <unistd.h>
#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"

int cardEffect(int card, int choice1, int choice2, int choice3, struct gameState *state, int handPos, int *bonus);



int main(){

  // set NOISY_TEST to 0 to remove printfs from output
#define NOISY_TEST 1

  int main() {
    int i;
    int seed = 1000;
    int numPlayer = 2;
    int maxBonus = 10;
    int p, r, handCount;
    int bonus;
    int k[10] = {adventurer, council_room, feast, gardens, mine
		 , remodel, smithy, village, baron, great_hall};
    int score;
     
 
    struct gameState G;
    int maxHandCount = 5;
    // arrays of all coppers, silvers, and golds
    int coppers[MAX_HAND];
    int silvers[MAX_HAND];
    int golds[MAX_HAND];
  
    int curses[MAX_HAND];
    int estates[MAX_HAND];
    int duchies[MAX_HAND];
    int provinces[MAX_HAND];
    int gardensA[MAX_HAND];
    // values of the arrays
    int curseCard = -1, estateCard = 1, duchyCard = 3, provinceCard = 6, gardenCard = 1;


    
  
    //initalize the cards
    for (i = 0; i < MAX_HAND; i++)
      {
	coppers[i] = copper;
	silvers[i] = silver;
	golds[i] = gold;
      
	curses[i] = curse;
	estates[i] = estate;
	duchies[i] = duchy;
	provinces[i] = province;
	gardensA[i] = gardens;
      }


    


  
    return 0;
  }
}
